package com.kaisu.blog.domain.blog.repostiroy;

import com.kaisu.blog.domain.blog.Blog;
import com.kaisu.blog.domain.blog.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Collection;
import java.util.Map;

/**
 * @author kaisu
 */
public interface BlogRepository {
    void save(Blog blog);

    Blog findById(String id);

    void removeByIds(Collection<String> ids);

    Page<Blog> pageByUserId(String userId, Pageable pageable);

    Page<Blog> pageInUserIds(Collection<String> userIds, Pageable pageable);

    Page<Blog> myBlogPage(String userId, Pageable pageable);

    Page<Comment> commentPage(String id, Pageable pageable);

    Page<Blog> blogPageBySearch(String key, Pageable pageable);

    Page<Blog> page(String currentUserId, Pageable pageable);
}